#include "Dice.h"
#include <ctime>
#include <string>
#include <iostream>
#include <stdlib.h>
using namespace std;


Dice::Dice()
{
	tal = 0;
	srand(time(NULL));
}


Dice::~Dice()
{
}
void Dice::Throw_dice()
{
	tal = rand() % 6 + 1;

}
void Dice::Paint_dice()
{
	{
		if (tal == 1){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "!   x   !" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else if (tal == 2){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "! x     !" << "\n";
			cout << "!       !" << "\n";
			cout << "!     x !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else if (tal == 3){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "! x     !" << "\n";
			cout << "!   x   !" << "\n";
			cout << "!     x !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else if (tal == 4){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "!       !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else if (tal == 5){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "!   x   !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else if (tal == 6){
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "! x   x !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
		else {
			cout << "---------" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "!       !" << "\n";
			cout << "---------" << "\n";
		}
	}
}
					